<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\UserController;
use App\Http\Controllers\TestController;
use App\Http\Controllers\VueDemo\HomeController;
use App\Http\Controllers\tradeController;

use App\Http\Controllers\Admin\LoginController;
use App\Http\Controllers\Admin\IndexController;




/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/




Route::get('admin/login',[LoginController::class ,'index']);



Route::get('/index',[IndexController::class , 'index']);
Route::get('/indext',[UserController::class , 'import']);









Route::get('/', function () {
    return view('welcome');
});

//Laravel 路由只接收一个 URI 和一个闭包，并以此为基础提供一个非常简单优雅的路由定义方法：
Route::get('hello', function () {
    return 'Hello Laravel!';
});

Route::get('/user', [UserController::class, 'index']);

Route::get('/publish-article', [UserController::class, 'publish'])->name('home.publish-article');

Route::get('/se1', [UserController::class, 'sendE']);

//从安全角度说，并不推荐上述这种路由定义方式，但是兼顾到便利性，
//我们可以通过 Route::match 指定请求方式白名单数组，比如下面这个路由可以匹配 GET 或 POST 请求：
Route::match(['get', 'post'], '/', function () {});

//如果你定义的路由需要传递参数，
Route::get('user/{id}', function ($id) {
    return "用户ID: " . $id;
});

Route::get('/test', [TestController::class, 'test']);
Route::post('/checku', [TestController::class, 'checku']);


Route::get('/vue/home', [HomeController::class, 'index']);
Route::get('/vue/home2', [HomeController::class, 'index2']);


Route::get('/trade', [tradeController::class, 'trade']);

